function getEmployee(page,pageSize,name){
  return axios({
        method:"get",
        url:"http://localhost:8080/employee/getMSG?page="+page+"&pageSize="+pageSize+"&name="+name
    })
}
function EditEmployee(Employee){
    return axios({
        method:"put",
        url:"http://localhost:8080/employee",
        data: {...Employee}
    })
}
function deleteEmployee(id){
    return axios({
        method:'delete',
        url:'http://localhost:8080/employee?id='+id
    })
}
function addEmployee(employee){
    return axios({
        method:'post',
        url:'http://localhost:8080/employee/addEmployee',
        data:employee,
        headers: {
            'Content-Type': 'application/json; charset=utf-8'
        }
    })
}
function requestUrlParam(){
    let url = location.href
    let index = url.indexOf("?")
    let flagUrl = url.slice(index+11,index+16)
    let idIndex = url.indexOf("&")
    let id = url.slice(idIndex+4)
    if(flagUrl=='false'){
        return id;
    }

}
function getEmployeeInfo(id){
    return axios({
        method:'get',
        url:'http://localhost:8080/employee/getEmployee?id='+id
    })
}
